﻿<%@ Page Title="" Language="C#" MasterPageFile="~/YiDashuihang_.Master" AutoEventWireup="true" CodeBehind="Dorm_add.aspx.cs" Inherits="YiDaShuiHang.Dorm_add" %>

<%@ Register Src="~/Alert.ascx" TagPrefix="uc1" TagName="Alert" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
        $(document).ready(function () {
         

  
            $("#select li").on("click", function () {
                var content = $(this).text();
                document.getElementById('tu').style.marginTop = '9px';
                $("#brand").text(content);
                check_logion("manager_name", "login.html");
            })
           
            $("#select1 li").on("click", function () {
                var content = $(this).text();
                document.getElementById('tu1').style.marginTop = '9px';
                $("#area").text(content);

            })
            $("#zhifuu li").on("click", function () {
                var content = $(this).text();
                document.getElementById('Span2').style.marginTop = '9px';
                $("#zhifu").text(content);

            })
        })
        function Submit() {
            $("#content_two").text("确定添加叫水？");
            $("#LoginBox_two").fadeIn("fast");
            $("#LoginBox_two").css({ display: 'block' });
        }
        function state(data) {
            if (data.result == "ok") {
                alert(data.msg);

            }
        }


        function yes_button() {
            var area = $.trim($("#brand").text());
            var louhao = $.trim($("#building").val());
            var dorm = $.trim($("#dorm").val());

            var brand = $.trim($("#area").text());
            var amount = $.trim($("#amount").val());
            var money = $.trim($("#money").val());

            var yajin = $.trim($("#foregift").val());
            var yizhifu_qian = $.trim($("#paid").val());
            var phone = $.trim($("#phone").val());
            var zhifu_state = $.trim($("#zhifu").text());
            var beizu = $.trim($("#remark").text());
            if (isUndefinedNullOrEmpty(louhao) && isUndefinedNullOrEmpty(dorm) && isUndefinedNullOrEmpty(brand)) {
                alert("楼号或宿舍或品牌不能为空！");
                return;
            }
            else if (isUndefinedNullOrEmpty(amount) && isUndefinedNullOrEmpty(money) && isUndefinedNullOrEmpty(zhifu_state)) {
                alert("桶数或总金额或支付状态不能为空！");
                return;

            }
            var str = area + "|" + louhao + "|" + dorm + "|" + brand + "|" + amount + "|" + money + "|" + yajin + "|" + yizhifu_qian + "|" + phone + "|" + zhifu_state + "|" + beizu;
            poststr = "{\"type\":\"addormcombo\",\"addormcombo_value\":\"" + str + "\"}";
            mj_js_ajax("json", poststr, state);
            $("#LoginBox_two").fadeOut("fast");
            $("#LoginBox_two").css({ display: 'none' });

        }
        function no_button() {
            $("#LoginBox_two").fadeOut("fast");
            $("#LoginBox_two").css({ display: 'none' });

        }
       </script>
    <style type="text/css">
        li {
        cursor:pointer
        
        }

    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    
    <div class="container">
        <div class="content" style=" width:98%; height:auto; margin:0 auto; ">
        <div class="header">
            <h1 class="page-title">
                添加宿舍套餐订单</h1>
        </div>
        <div class="main-content">
            <div class="row">
                <div class="col-md-6">
                       <div class=" form-group col-md-6 col-sm-12  dropdown" >
                    <label for="brand_name" style=" display:block">
                            区域</label>
                        <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1"
                            data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="  height:34px; width:235px">
                            <span id="brand" style=" width:80%"></span><span style=" width:10% "><span id="tu" class="caret"style="margin-top:3px; float:right"></span></span>
                        </button>
                        <ul class="dropdown-menu" aria-labelledby="dropdownMenu1"style="  width:245px; margin-left:6%" id="select">
                            <li><a>旧白宫 7-13</a></li>
                            <li><a >四合院 14-22</a></li>
                            <li><a >北区女生宿舍 23-33</a></li>
                            <li><a >新白宫 34-37</a></li>
                            <li><a >西区宿舍 38-43</a></li>
                            <li><a >玫瑰园1 44-46</a></li>
                            <li><a >玫瑰园2 47-48</a></li>
                            <li><a >其他</a></li>
                        </ul>
                    </div>
                  
                        <div class="form-group col-md-6 col-sm-12">
                            <label>
                                楼号</label><input type="text" class="form-control"style="height:34px" id="building" placeholder="输入楼号"></div>
                        <div class="form-group col-md-6 col-sm-12">
                            <label>
                                宿舍</label><input type="text" class="form-control" id="dorm"style="height:34px" placeholder="输入宿舍"></div>
                      
                        <div class=" form-group col-md-6 col-sm-12 dropdown" >
                       <label for="brand_name" style=" display:block">
                            品牌</label>
                        <button class="btn btn-default dropdown-toggle" type="button" id="Button1"
                            data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="  height:34px; width:235px">
                             <span id="area" style=" width:80%"></span><span style=" width:10% "><span id="tu1" class="caret"style="margin-top:3px; float:right"></span></span>
                        </button>
                        <ul class="dropdown-menu" aria-labelledby="dropdownMenu1" id="select1" style="  width:235px;margin-left:6%">
                            <li><a>茶山甘泉</a></li>
                            <li><a >七井山泉</a></li>
                            <li><a >怡宝</a></li>
                            <li><a >古兜山</a></li>
                            <li><a>鼎湖绿洲</a></li>
                        </ul>
                    </div>
                   
                        <div class="form-group col-md-6 col-sm-12">
                            <label>
                                桶数</label><input type="text" class="form-control" id="amount"style="height:34px" placeholder="输入桶数"></div>
                        <div class="form-group col-md-6 col-sm-12">
                            <label>
                                总金额</label><input type="text" class="form-control" id="money" style="height:34px" placeholder="输入总金额"></div>
                        <div class="form-group col-md-6 col-sm-12">
                            <label>
                                押金</label><input type="text" class="form-control" id="foregift"style="height:34px" placeholder="输入押金"></div>
                        <div class="form-group col-md-6 col-sm-12">
                            <label>
                                已支付金额</label><input type="text" class="form-control"style="height:34px" id="paid" placeholder="输入已付金额"></div>
                        <div class="form-group col-md-6 col-sm-12">
                            <label>
                                电话</label><input type="text" class="form-control"style="height:34px" id="phone" placeholder="输入电话"></div>

                       <div class=" form-group col-md-6 col-sm-12 dropdown" >
                       <label for="brand_name" style=" display:block">
                            支付状态</label>
                        <button class="btn btn-default dropdown-toggle" type="button" id="Button2"
                            data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="  height:34px; width:235px">
                             <span id="zhifu" style=" width:80%"></span><span style=" width:10% "><span id="Span2" class="caret"style="margin-top:3px; float:right"></span></span>
                        </button>
                        <ul class="dropdown-menu" aria-labelledby="dropdownMenu1" id="zhifuu" style="  width:235px;margin-left:6%">
                            <li><a>已全支付</a></li>
                            <li><a >未全支付</a></li>
                        </ul>
                    </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group col-md-6 col-sm-12">
                        <label>
                            备注</label><textarea class="form-control" rows="15" style="width: 326px;" id="remark"
                                placeholder="输入备注"></textarea></div>
                </div>
            </div>
            <div class="btn-toolbar list-toolbar">
                <input class="btn btn-info" value="添加" type="button" id="add" onclick="Submit()">
                    </div>
            <div id="msg" class="text-success">
            </div>
            <footer><hr><p>© 2015 <a href="#">shuihang</a></p></footer>
        </div>
   </div>
     <uc1:Alert runat="server" ID="Alert" />
</asp:Content>
